#include "Character.h"

// ---------------------- //

Character::Character( const Parameter& param, const Point& mapPoint, const Vector2& pos, int textureHandle )
	: GameObject( textureHandle, pos )
	, m_parameter( param )
	, m_mapPoint( mapPoint )
	, m_currentHp( param.HP )
{
}

// ---------------------- //

Character::~Character(void)
{
}

// ---------------------- //

void Character::SetupCommand( COMMAND_TYPE	type, unsigned int action, bool isValid )
{
	m_command.pOwner	= this;
	m_command.type		= type;
	m_command.action	= action;
	m_command.isValid	= isValid;
}

// ---------------------- //

void Character::Update( float delta )
{
	if ( m_currentHp <= 0.0f 
		&& m_charaType != CHARA_PLAYER
		)
	{
		SetDeath( true );
	}
	GameObject::Update( delta );
}

// ---------------------- //

void Character::Draw()
{
	GameObject::Draw();
}
